using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using Zwms.Data.Base;
using System.Runtime.Serialization;

namespace Zwms.Data.BusinessObjects
{
    [DataContract]
    public partial class StoLock : BusinessBase<string>
    {
        #region Declarations

        private string _lockType = String.Empty;
        private string _lockDate = String.Empty;
        private string _lockTime = String.Empty;
        private string _lockReason = String.Empty;
        private string _operatorCode = String.Empty;
        private string _operatorName = String.Empty;
        private string _lockStockCode = String.Empty;
        private string _warehouseCode = String.Empty;
        private string _warehouseName = String.Empty;
        private string _locationCode = String.Empty;
        private string _locationName = String.Empty;
        private string _storageUnitCode = String.Empty;
        private string _storageUnitName = String.Empty;
        private string _goodsCode = String.Empty;
        private string _goodsName = String.Empty;
        private string _goodsPacket = String.Empty;
        private int _goodsQty = default(Int32);
        private string _piecePacket = String.Empty;
        private int _pieceQty = default(Int32);
        private string _billType = String.Empty;
        private string _billCode = String.Empty;
        private string _lockMode = String.Empty;
        private string _jobCode = String.Empty;
        private string _instructionCode = String.Empty;
        private string _permitReceive = String.Empty;
        private string _permitTransfer = String.Empty;
        private string _permitPutaway = String.Empty;
        private string _permitPick = String.Empty;
        private string _permitCount = String.Empty;
        private string _permitIssue = String.Empty;
        private string _remark = String.Empty;



        #endregion

        #region Constructors

        public StoLock() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.Append(this.GetType().FullName);
            sb.Append(_lockType);
            sb.Append(_lockDate);
            sb.Append(_lockTime);
            sb.Append(_lockReason);
            sb.Append(_operatorCode);
            sb.Append(_operatorName);
            sb.Append(_lockStockCode);
            sb.Append(_warehouseCode);
            sb.Append(_warehouseName);
            sb.Append(_locationCode);
            sb.Append(_locationName);
            sb.Append(_storageUnitCode);
            sb.Append(_storageUnitName);
            sb.Append(_goodsCode);
            sb.Append(_goodsName);
            sb.Append(_goodsPacket);
            sb.Append(_goodsQty);
            sb.Append(_piecePacket);
            sb.Append(_pieceQty);
            sb.Append(_billType);
            sb.Append(_billCode);
            sb.Append(_lockMode);
            sb.Append(_jobCode);
            sb.Append(_instructionCode);
            sb.Append(_permitReceive);
            sb.Append(_permitTransfer);
            sb.Append(_permitPutaway);
            sb.Append(_permitPick);
            sb.Append(_permitCount);
            sb.Append(_permitIssue);
            sb.Append(_remark);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

        [DataMember]
        public virtual string LockType
        {
            get { return _lockType.TrimEnd(); }
            set
            {
                OnLockTypeChanging();
                _lockType = value;
                OnLockTypeChanged();
            }
        }
        partial void OnLockTypeChanging();
        partial void OnLockTypeChanged();

        [DataMember]
        public virtual string LockDate
        {
            get { return _lockDate.TrimEnd(); }
            set
            {
                OnLockDateChanging();
                _lockDate = value;
                OnLockDateChanged();
            }
        }
        partial void OnLockDateChanging();
        partial void OnLockDateChanged();

        [DataMember]
        public virtual string LockTime
        {
            get { return _lockTime.TrimEnd(); }
            set
            {
                OnLockTimeChanging();
                _lockTime = value;
                OnLockTimeChanged();
            }
        }
        partial void OnLockTimeChanging();
        partial void OnLockTimeChanged();

        [DataMember]
        public virtual string LockReason
        {
            get { return _lockReason.TrimEnd(); }
            set
            {
                OnLockReasonChanging();
                _lockReason = value;
                OnLockReasonChanged();
            }
        }
        partial void OnLockReasonChanging();
        partial void OnLockReasonChanged();

        [DataMember]
        public virtual string OperatorCode
        {
            get { return _operatorCode.TrimEnd(); }
            set
            {
                OnOperatorCodeChanging();
                _operatorCode = value;
                OnOperatorCodeChanged();
            }
        }
        partial void OnOperatorCodeChanging();
        partial void OnOperatorCodeChanged();

        [DataMember]
        public virtual string OperatorName
        {
            get { return _operatorName.TrimEnd(); }
            set
            {
                OnOperatorNameChanging();
                _operatorName = value;
                OnOperatorNameChanged();
            }
        }
        partial void OnOperatorNameChanging();
        partial void OnOperatorNameChanged();

        [DataMember]
        public virtual string LockStockCode
        {
            get { return _lockStockCode.TrimEnd(); }
            set
            {
                OnLockStockCodeChanging();
                _lockStockCode = value;
                OnLockStockCodeChanged();
            }
        }
        partial void OnLockStockCodeChanging();
        partial void OnLockStockCodeChanged();

        [DataMember]
        public virtual string WarehouseCode
        {
            get { return _warehouseCode.TrimEnd(); }
            set
            {
                OnWarehouseCodeChanging();
                _warehouseCode = value;
                OnWarehouseCodeChanged();
            }
        }
        partial void OnWarehouseCodeChanging();
        partial void OnWarehouseCodeChanged();

        [DataMember]
        public virtual string WarehouseName
        {
            get { return _warehouseName.TrimEnd(); }
            set
            {
                OnWarehouseNameChanging();
                _warehouseName = value;
                OnWarehouseNameChanged();
            }
        }
        partial void OnWarehouseNameChanging();
        partial void OnWarehouseNameChanged();

        [DataMember]
        public virtual string LocationCode
        {
            get { return _locationCode.TrimEnd(); }
            set
            {
                OnLocationCodeChanging();
                _locationCode = value;
                OnLocationCodeChanged();
            }
        }
        partial void OnLocationCodeChanging();
        partial void OnLocationCodeChanged();

        [DataMember]
        public virtual string LocationName
        {
            get { return _locationName.TrimEnd(); }
            set
            {
                OnLocationNameChanging();
                _locationName = value;
                OnLocationNameChanged();
            }
        }
        partial void OnLocationNameChanging();
        partial void OnLocationNameChanged();

        [DataMember]
        public virtual string StorageUnitCode
        {
            get { return _storageUnitCode.TrimEnd(); }
            set
            {
                OnStorageUnitCodeChanging();
                _storageUnitCode = value;
                OnStorageUnitCodeChanged();
            }
        }
        partial void OnStorageUnitCodeChanging();
        partial void OnStorageUnitCodeChanged();

        [DataMember]
        public virtual string StorageUnitName
        {
            get { return _storageUnitName.TrimEnd(); }
            set
            {
                OnStorageUnitNameChanging();
                _storageUnitName = value;
                OnStorageUnitNameChanged();
            }
        }
        partial void OnStorageUnitNameChanging();
        partial void OnStorageUnitNameChanged();

        [DataMember]
        public virtual string GoodsCode
        {
            get { return _goodsCode.TrimEnd(); }
            set
            {
                OnGoodsCodeChanging();
                _goodsCode = value;
                OnGoodsCodeChanged();
            }
        }
        partial void OnGoodsCodeChanging();
        partial void OnGoodsCodeChanged();

        [DataMember]
        public virtual string GoodsName
        {
            get { return _goodsName.TrimEnd(); }
            set
            {
                OnGoodsNameChanging();
                _goodsName = value;
                OnGoodsNameChanged();
            }
        }
        partial void OnGoodsNameChanging();
        partial void OnGoodsNameChanged();

        [DataMember]
        public virtual string GoodsPacket
        {
            get { return _goodsPacket.TrimEnd(); }
            set
            {
                OnGoodsPacketChanging();
                _goodsPacket = value;
                OnGoodsPacketChanged();
            }
        }
        partial void OnGoodsPacketChanging();
        partial void OnGoodsPacketChanged();

        [DataMember]
        public virtual int GoodsQty
        {
            get { return _goodsQty; }
            set
            {
                OnGoodsQtyChanging();
                _goodsQty = value;
                OnGoodsQtyChanged();
            }
        }
        partial void OnGoodsQtyChanging();
        partial void OnGoodsQtyChanged();

        [DataMember]
        public virtual string PiecePacket
        {
            get { return _piecePacket.TrimEnd(); }
            set
            {
                OnPiecePacketChanging();
                _piecePacket = value;
                OnPiecePacketChanged();
            }
        }
        partial void OnPiecePacketChanging();
        partial void OnPiecePacketChanged();

        [DataMember]
        public virtual int PieceQty
        {
            get { return _pieceQty; }
            set
            {
                OnPieceQtyChanging();
                _pieceQty = value;
                OnPieceQtyChanged();
            }
        }
        partial void OnPieceQtyChanging();
        partial void OnPieceQtyChanged();

        [DataMember]
        public virtual string BillType
        {
            get { return _billType.TrimEnd(); }
            set
            {
                OnBillTypeChanging();
                _billType = value;
                OnBillTypeChanged();
            }
        }
        partial void OnBillTypeChanging();
        partial void OnBillTypeChanged();

        [DataMember]
        public virtual string BillCode
        {
            get { return _billCode.TrimEnd(); }
            set
            {
                OnBillCodeChanging();
                _billCode = value;
                OnBillCodeChanged();
            }
        }
        partial void OnBillCodeChanging();
        partial void OnBillCodeChanged();

        [DataMember]
        public virtual string LockMode
        {
            get { return _lockMode.TrimEnd(); }
            set
            {
                OnLockModeChanging();
                _lockMode = value;
                OnLockModeChanged();
            }
        }
        partial void OnLockModeChanging();
        partial void OnLockModeChanged();

        [DataMember]
        public virtual string JobCode
        {
            get { return _jobCode.TrimEnd(); }
            set
            {
                OnJobCodeChanging();
                _jobCode = value;
                OnJobCodeChanged();
            }
        }
        partial void OnJobCodeChanging();
        partial void OnJobCodeChanged();

        [DataMember]
        public virtual string InstructionCode
        {
            get { return _instructionCode.TrimEnd(); }
            set
            {
                OnInstructionCodeChanging();
                _instructionCode = value;
                OnInstructionCodeChanged();
            }
        }
        partial void OnInstructionCodeChanging();
        partial void OnInstructionCodeChanged();

        [DataMember]
        public virtual string PermitReceive
        {
            get { return _permitReceive.TrimEnd(); }
            set
            {
                OnPermitReceiveChanging();
                _permitReceive = value;
                OnPermitReceiveChanged();
            }
        }
        partial void OnPermitReceiveChanging();
        partial void OnPermitReceiveChanged();

        [DataMember]
        public virtual string PermitTransfer
        {
            get { return _permitTransfer.TrimEnd(); }
            set
            {
                OnPermitTransferChanging();
                _permitTransfer = value;
                OnPermitTransferChanged();
            }
        }
        partial void OnPermitTransferChanging();
        partial void OnPermitTransferChanged();

        [DataMember]
        public virtual string PermitPutaway
        {
            get { return _permitPutaway.TrimEnd(); }
            set
            {
                OnPermitPutawayChanging();
                _permitPutaway = value;
                OnPermitPutawayChanged();
            }
        }
        partial void OnPermitPutawayChanging();
        partial void OnPermitPutawayChanged();

        [DataMember]
        public virtual string PermitPick
        {
            get { return _permitPick.TrimEnd(); }
            set
            {
                OnPermitPickChanging();
                _permitPick = value;
                OnPermitPickChanged();
            }
        }
        partial void OnPermitPickChanging();
        partial void OnPermitPickChanged();

        [DataMember]
        public virtual string PermitCount
        {
            get { return _permitCount.TrimEnd(); }
            set
            {
                OnPermitCountChanging();
                _permitCount = value;
                OnPermitCountChanged();
            }
        }
        partial void OnPermitCountChanging();
        partial void OnPermitCountChanged();

        [DataMember]
        public virtual string PermitIssue
        {
            get { return _permitIssue.TrimEnd(); }
            set
            {
                OnPermitIssueChanging();
                _permitIssue = value;
                OnPermitIssueChanged();
            }
        }
        partial void OnPermitIssueChanging();
        partial void OnPermitIssueChanged();

        [DataMember]
        public virtual string Remark
        {
            get { return _remark.TrimEnd(); }
            set
            {
                OnRemarkChanging();
                _remark = value;
                OnRemarkChanged();
            }
        }
        partial void OnRemarkChanging();
        partial void OnRemarkChanged();

        #endregion
    }
}